<?php

namespace App\Console;

use Illuminate\Console\Scheduling\Schedule;
use Illuminate\Foundation\Console\Kernel as ConsoleKernel;
use App\Jobs\ProcessAlarm;

class Kernel extends ConsoleKernel
{
    /**
     * The Artisan commands provided by your application.
     *
     * @var array
     */
    protected $commands = [
        Commands\Initauth::class,
        Commands\GenerateReal::class,
        Commands\WarnHistory::class,
        Commands\GenerateHour::class,
        Commands\GenWater::class,
        Commands\GenerateAllHour::class,
        Commands\GenerateLocal::class,
        Commands\ToTemplate::class,
        Commands\TestSoap::class,
        Commands\GenerateReal2::class,
        Commands\TestData::class,
        Commands\FixTree::class,
        Commands\GenerateSeeder::class,
        Commands\CreateSummyTable::class,
        Commands\CreateReport::class,
        Commands\SumReport::class,
    ];

    /**
     * Define the application's command schedule.
     *
     * @param  \Illuminate\Console\Scheduling\Schedule  $schedule
     * @return void
     */
    protected function schedule(Schedule $schedule)
    {
        //每小时的第5分钟执行一次
        //          ->hourly();
      // $schedule->command('to:wechat')->everyMinute();
        $schedule->job(new ProcessAlarm)->everyMinute();
    }

    /**
     * Register the commands for the application.
     *
     * @return void
     */
    protected function commands()
    {
        $this->load(__DIR__.'/Commands');

        require base_path('routes/console.php');
    }
}
